package com.maxchaintech.integral.service.impl;

import java.util.List;

import com.maxchaintech.integral.domain.PointsRedemptionOrder;
import com.maxchaintech.integral.mapper.PointsRedemptionOrderMapper;
import com.maxchaintech.integral.service.IPointsRedemptionOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 积分兑换订单Service业务层处理
 * 
 * @author jyw
 * @date 2021-04-20
 */
@Service
public class PointsRedemptionOrderServiceImpl implements IPointsRedemptionOrderService
{
    @Autowired
    private PointsRedemptionOrderMapper pointsRedemptionOrderMapper;

    /**
     * 查询积分兑换订单
     * 
     * @param id 积分兑换订单ID
     * @return 积分兑换订单
     */
    @Override
    public PointsRedemptionOrder selectPointsRedemptionOrderById(Long id)
    {
        return pointsRedemptionOrderMapper.selectPointsRedemptionOrderById(id);
    }

    /**
     * 查询积分兑换订单列表
     * 
     * @param pointsRedemptionOrder 积分兑换订单
     * @return 积分兑换订单
     */
    @Override
    public List<PointsRedemptionOrder> selectPointsRedemptionOrderList(PointsRedemptionOrder pointsRedemptionOrder)
    {
        return pointsRedemptionOrderMapper.selectPointsRedemptionOrderList(pointsRedemptionOrder);
    }

    /**
     * 新增积分兑换订单
     * 
     * @param pointsRedemptionOrder 积分兑换订单
     * @return 结果
     */
    @Override
    public int insertPointsRedemptionOrder(PointsRedemptionOrder pointsRedemptionOrder)
    {
        return pointsRedemptionOrderMapper.insertPointsRedemptionOrder(pointsRedemptionOrder);
    }

    /**
     * 修改积分兑换订单
     * 
     * @param pointsRedemptionOrder 积分兑换订单
     * @return 结果
     */
    @Override
    public int updatePointsRedemptionOrder(PointsRedemptionOrder pointsRedemptionOrder)
    {
        return pointsRedemptionOrderMapper.updatePointsRedemptionOrder(pointsRedemptionOrder);
    }

    /**
     * 批量删除积分兑换订单
     * 
     * @param ids 需要删除的积分兑换订单ID
     * @return 结果
     */
    @Override
    public int deletePointsRedemptionOrderByIds(Long[] ids)
    {
        return pointsRedemptionOrderMapper.deletePointsRedemptionOrderByIds(ids);
    }

    /**
     * 删除积分兑换订单信息
     * 
     * @param id 积分兑换订单ID
     * @return 结果
     */
    @Override
    public int deletePointsRedemptionOrderById(Long id)
    {
        return pointsRedemptionOrderMapper.deletePointsRedemptionOrderById(id);
    }
}
